﻿using IResoitory;
using IService;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service
{
    //服务层_教师表接口实现类
    public class TeacherService:BaseService<Teacher>,ITeacherService
    {
        private readonly IBaseRepository<Teacher> _repository;

        public TeacherService(IBaseRepository<Teacher> repository)
        {
            base.BaseRepository = repository;
            _repository = repository;
        }

        //查询教师的上课记录
        public async Task<List<Teacher>> ClassRecord(int id)
        {
            return await _context.Set<Teacher>().Include(o => o.CourseSchedulings).Where(o => o.TeacherId == id).ToListAsync();
        }
    }
}
